<%--
  Created by IntelliJ IDEA.
  User: 黑旋风诸葛亮
  Date: 2018/2/5
  Time: 16:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<div>

    跳转

</div>
请上传文件：<input type="file" value="file" id="fileId">
<div onclick="fun()">
   点击

    </div>
</body>

<script>

    function fun() {

        var file = $("#fileId");
        console.log(file);
        var ajax = new XMLHttpRequest();
        ajax.open('get','test');
        if(ajax.status == 200){

            alert("add")
        }
    }


</script>
</html>
